﻿using MotionCS.Controller;
using MotionCS.Helper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MotionCS.Module
{
    public enum LineModeE
    {
        /// <summary>
        /// 在线
        /// </summary>
        OnLine,
        /// <summary>
        /// 离线
        /// </summary>
        OffLine
    }

    public enum LineDirectionE
    {
        /// <summary>
        /// 左进板
        /// </summary>
        Left,
        /// <summary>
        /// 右进板
        /// </summary>
        Right
    }

    public class ConveyorModuleConfig
    {
        /// <summary>
        /// 模组名称
        /// </summary>
        public string Name;
        /// <summary>
        /// 模组Key
        /// </summary>
        public int ModuleKey;
        /// <summary>
        /// 线体模式
        /// </summary>
        public LineModeE LineMode;
        /// <summary>
        /// 传送带方向
        /// </summary>
        public LineDirectionE Direction;
        /// <summary>
        /// 检测结果模式 NG信号输出，0不启用，1启用
        /// </summary>
        public int SmemaMode;
        /// <summary>
        /// 传送轴标识
        /// </summary>
        public AxisEnum AxisT;
        /// <summary>
        /// 调宽轴标识
        /// </summary>
        public AxisEnum AxisW;
        /// <summary>
        /// 气缸1标识
        /// </summary>
        public DoE Cylinder1;
        /// <summary>
        /// 气缸2标识
        /// </summary>
        public DoE Cylinder2;
        /// <summary>
        /// 气缸3标识
        /// </summary>
        public DoE Cylinder3;
        /// <summary>
        /// 直通模式
        /// </summary>
        public DiE PassMode;
        /// <summary>
        /// 感应器1
        /// </summary>
        public DiE Sensor1;
        /// <summary>
        /// 感应器2
        /// </summary>
        public DiE Sensor2;
        /// <summary>
        /// 感应器3
        /// </summary>
        public DiE Sensor3;
        /// <summary>
        /// 感应器4
        /// </summary>
        public DiE Sensor4;
        /// <summary>
        /// 上游有板
        /// </summary>
        public DiE DiFrontReady;
        /// <summary>
        /// 下游要板
        /// </summary>
        public DiE DiAfterReady;
        /// <summary>
        /// 本机要板
        /// </summary>
        public DoE DoFrontReady;
        /// <summary>
        /// 本机有板
        /// </summary>
        public DoE DoAfterReady;
        /// <summary>
        /// 检测结果
        /// </summary>
        public DoE DoCheckReady;
        /// <summary>
        /// 超时时长
        /// </summary>
        public int Timeout;
        /// <summary>
        /// 调宽轴位置
        /// </summary>
        public float AxisWPosition;
        /// <summary>
        /// 调宽轴校准
        /// </summary>
        public float AxisWCheck;
        /// <summary>
        /// 读码器配置
        /// </summary>
        public CodeReaderConfi ReaderConfi;
    }
}
